varying vec2 tcoord;
uniform sampler2D tex;
uniform vec4 colU;
uniform vec4 colL;
void main(void) 
{
    
	vec4 texcol = texture2D(tex,tcoord);
    
    bvec4 resultGT = greaterThanEqual(texcol,colL);
    bvec4 resultLT = greaterThanEqual(colU, texcol);
    resultGT.a = true;
    resultLT.a = true;

    bool GT = all(resultGT);
    bool LT = all(resultLT);

  
    if (GT && LT){
        gl_FragColor = vec4(1.0,1.0,1.0,1.0);
    }
    else{
        gl_FragColor = vec4(0.0,0.0,0.0,0.0);
    }

}
